import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.ambulance.framework.task.HdTask;
import com.ambulance.project.biz.entity.Car;
import com.ambulance.utils.CommonUtils;
import com.google.common.base.CaseFormat;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import java.time.LocalDateTime;
import java.util.Set;

/***
 *  @description
 *  @author zhao
 *  @date: 2020/4/28
 *  @version: v1.0
 */

public class TesetMain {
    @Autowired
    private HdTask hdTask;

    public static void main(String[] args) {
        System.out.println(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "carID"));//testData
        System.out.println(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "last_dispatch_driver_name"));//testData

        Car car = new Car();
        car.setLastDispatchTime(LocalDateTime.now());
        System.out.println(CommonUtils.parseLocalDateTime(car.getLastDispatchTime()));
    }

    public static void main2(String[] args) {
        String content = "{\"0\":\"1\",\"1\":\"3\",\"2\":\"2\",\"3\":\"5\"}";

        JSONObject jsonObject = JSON.parseObject(content);
        Set<String> keySet = jsonObject.keySet();
        for (String item : keySet) {
            String string = jsonObject.getString(item);
            System.out.println("K-----" + item + "||||" + "v-----" + string);
        }

        System.out.println(jsonObject);
    }

    @Test
    public void test01() {
        String username = "MGT_admin";
        String header = username.substring(0, 4);
        String real = username.substring(4, username.length());
        System.out.println(real);

        System.out.println(header);


    }

    @Test
    public void test02() {

    }
}
